﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using HM.DataLayer;

namespace HM.Service
{
    [ServiceContract]
    public interface IHMService
    {
        #region Add

        [OperationContract]
        void AddTenant(Tenant tenant);

        [OperationContract]
        void AddPayment(Payment payment);

        [OperationContract]
        void AddExpense(Expense expense);

        [OperationContract]
        void AddRegularExpense(RegularExpense regularExpense);

        #endregion

        #region Get

        [OperationContract]
        IEnumerable<Tenant> GetTenants();

        [OperationContract]
        IEnumerable<Payment> GetPayments();

        [OperationContract]
        IEnumerable<Payment> GetPaymentsByTenantsId(int tenantId);

        [OperationContract]
        IEnumerable<Payment> GetPaymentsByDateRange(DateTime from, DateTime to);

        [OperationContract]
        IEnumerable<RegularExpense> GetRegularExpenses();

        [OperationContract]
        IEnumerable<Expense> GetExpenses();

        [OperationContract]
        IEnumerable<Expense> GetExpensesByDateRange(DateTime from, DateTime to);

        [OperationContract]
        Decimal? GetCash();

        [OperationContract]
        Decimal? GetCashForThisMonth();

        #endregion

        #region Save

        //[OperationContract]
        //void SavePayment(Payment payment);

        [OperationContract]
        void SaveTenants(IEnumerable<Tenant> tenants);

        [OperationContract]
        void SaveRegularExpenses(IEnumerable<RegularExpense> regularExpenses);

        [OperationContract]
        void SaveExpenses(IEnumerable<Expense> expenses);

        [OperationContract]
        void SavePayments(IEnumerable<Payment> payments);

        #endregion

        #region Remove

        [OperationContract]
        void RemoveTenant(Tenant tenant);

        [OperationContract]
        void RemoveRegularExpense(RegularExpense regularExpense);

        [OperationContract]
        void RemoveExpense(Expense expense);

        [OperationContract]
        void RemovePayment(Payment payment);

        #endregion
    }
}
